﻿<Window x:Class="ALPShell.LogonWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  
        Width="570" Height="300"  Closing="OnClosing"
        WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize" Title="登录">
    <Grid Width="550" Height="250">
        <Image Source="/Resource;component/Images/LogonBG.jpg" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stretch="Fill"/>
        <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Background="Transparent">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <TextBlock Text="用户名" FontFamily="Tahoma" FontSize="12" Grid.Row="0" Grid.Column="0" Margin="10 5"></TextBlock>
            <TextBlock Text="密码" FontFamily="Tahoma" FontSize="12" Grid.Row="1" Grid.Column="0" Margin="10 5"></TextBlock>
            <TextBox Text="{Binding UserName,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontFamily="Tahoma" FontSize="12" Grid.Row="0"
                     Grid.Column="1" Width="120" Margin="10 5"></TextBox>
            <TextBox Text="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" FontFamily="Tahoma" FontSize="12" Grid.Row="1"
                     Grid.Column="1" Width="120" Margin="10 5">
            </TextBox>
            <StackPanel Orientation="Horizontal" Grid.ColumnSpan="2" Grid.Row="2" HorizontalAlignment="Center">
                <telerik:RadButton Width="80" Height="22" Content="确定" Margin="0 0 5 0" Command="{Binding LogonCommand}"></telerik:RadButton>
                <telerik:RadButton Width="80" Height="22" Content="取消" Margin="5 0 0 0" Command="{Binding CancelLogonCommand}"></telerik:RadButton>
            </StackPanel>
        </Grid>
    </Grid>
</Window>
